package com.ncsc.erp.model;
// Generated 20 มิ.ย. 2557, 12:55:43 by Hibernate Tools 3.4.0.CR1


import java.math.BigDecimal;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * SdQuotationItem generated by hbm2java
 */
@Entity
@Table(name="sd_quotation_item"
    ,catalog="ncsc_erp"
)
public class SdQuotationItem  implements java.io.Serializable {


     private SdQuotationItemId id;
     private SdQuotation sdQuotation;
     private MmItem mmItem;
     private String qtItemCode;
     private String qtItemDescr;
     private BigDecimal qtQty;
     private BigDecimal qtPpu;
     private short qtStatusIncVat;
     private BigDecimal qtVatPercVal;
     private BigDecimal qtVat;
     private BigDecimal qtTotalPriceExcVat;
     private BigDecimal qtTotalPrice;

    public SdQuotationItem() {
    }

	
    public SdQuotationItem(SdQuotationItemId id, SdQuotation sdQuotation, BigDecimal qtQty, BigDecimal qtPpu, short qtStatusIncVat, BigDecimal qtVatPercVal, BigDecimal qtVat, BigDecimal qtTotalPriceExcVat, BigDecimal qtTotalPrice) {
        this.id = id;
        this.sdQuotation = sdQuotation;
        this.qtQty = qtQty;
        this.qtPpu = qtPpu;
        this.qtStatusIncVat = qtStatusIncVat;
        this.qtVatPercVal = qtVatPercVal;
        this.qtVat = qtVat;
        this.qtTotalPriceExcVat = qtTotalPriceExcVat;
        this.qtTotalPrice = qtTotalPrice;
    }
    public SdQuotationItem(SdQuotationItemId id, SdQuotation sdQuotation, MmItem mmItem, String qtItemCode, String qtItemDescr, BigDecimal qtQty, BigDecimal qtPpu, short qtStatusIncVat, BigDecimal qtVatPercVal, BigDecimal qtVat, BigDecimal qtTotalPriceExcVat, BigDecimal qtTotalPrice) {
       this.id = id;
       this.sdQuotation = sdQuotation;
       this.mmItem = mmItem;
       this.qtItemCode = qtItemCode;
       this.qtItemDescr = qtItemDescr;
       this.qtQty = qtQty;
       this.qtPpu = qtPpu;
       this.qtStatusIncVat = qtStatusIncVat;
       this.qtVatPercVal = qtVatPercVal;
       this.qtVat = qtVat;
       this.qtTotalPriceExcVat = qtTotalPriceExcVat;
       this.qtTotalPrice = qtTotalPrice;
    }
   
     @EmbeddedId

    
    @AttributeOverrides( {
        @AttributeOverride(name="qtNo", column=@Column(name="QT_NO", nullable=false) ), 
        @AttributeOverride(name="qtItemSeqNo", column=@Column(name="QT_ITEM_SEQ_NO", nullable=false) ) } )
    public SdQuotationItemId getId() {
        return this.id;
    }
    
    public void setId(SdQuotationItemId id) {
        this.id = id;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="QT_NO", nullable=false, insertable=false, updatable=false)
    public SdQuotation getSdQuotation() {
        return this.sdQuotation;
    }
    
    public void setSdQuotation(SdQuotation sdQuotation) {
        this.sdQuotation = sdQuotation;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="QT_ITEM_NO")
    public MmItem getMmItem() {
        return this.mmItem;
    }
    
    public void setMmItem(MmItem mmItem) {
        this.mmItem = mmItem;
    }

    
    @Column(name="QT_ITEM_CODE", length=50)
    public String getQtItemCode() {
        return this.qtItemCode;
    }
    
    public void setQtItemCode(String qtItemCode) {
        this.qtItemCode = qtItemCode;
    }

    
    @Column(name="QT_ITEM_DESCR", length=300)
    public String getQtItemDescr() {
        return this.qtItemDescr;
    }
    
    public void setQtItemDescr(String qtItemDescr) {
        this.qtItemDescr = qtItemDescr;
    }

    
    @Column(name="QT_QTY", nullable=false, precision=10)
    public BigDecimal getQtQty() {
        return this.qtQty;
    }
    
    public void setQtQty(BigDecimal qtQty) {
        this.qtQty = qtQty;
    }

    
    @Column(name="QT_PPU", nullable=false, precision=10)
    public BigDecimal getQtPpu() {
        return this.qtPpu;
    }
    
    public void setQtPpu(BigDecimal qtPpu) {
        this.qtPpu = qtPpu;
    }

    
    @Column(name="QT_STATUS_INC_VAT", nullable=false)
    public short getQtStatusIncVat() {
        return this.qtStatusIncVat;
    }
    
    public void setQtStatusIncVat(short qtStatusIncVat) {
        this.qtStatusIncVat = qtStatusIncVat;
    }

    
    @Column(name="QT_VAT_PERC_VAL", nullable=false, precision=10)
    public BigDecimal getQtVatPercVal() {
        return this.qtVatPercVal;
    }
    
    public void setQtVatPercVal(BigDecimal qtVatPercVal) {
        this.qtVatPercVal = qtVatPercVal;
    }

    
    @Column(name="QT_VAT", nullable=false, precision=15)
    public BigDecimal getQtVat() {
        return this.qtVat;
    }
    
    public void setQtVat(BigDecimal qtVat) {
        this.qtVat = qtVat;
    }

    
    @Column(name="QT_TOTAL_PRICE_EXC_VAT", nullable=false, precision=15)
    public BigDecimal getQtTotalPriceExcVat() {
        return this.qtTotalPriceExcVat;
    }
    
    public void setQtTotalPriceExcVat(BigDecimal qtTotalPriceExcVat) {
        this.qtTotalPriceExcVat = qtTotalPriceExcVat;
    }

    
    @Column(name="QT_TOTAL_PRICE", nullable=false, precision=15)
    public BigDecimal getQtTotalPrice() {
        return this.qtTotalPrice;
    }
    
    public void setQtTotalPrice(BigDecimal qtTotalPrice) {
        this.qtTotalPrice = qtTotalPrice;
    }




}


